<?php

include_once("../service/productService.php");

$proIDs = $_POST['pro_id'];
$proID = $_GET['pro_id'];
if (isset($proIDs)) {
    if (!empty($proIDs)) {
        foreach ($proIDs as $id) {
            removeProduct($id);
        }
        Header("Location: ../admin-page/product.php?delete_message=ok");
    }
} else if (isset($proID)) {
    removeProduct($proID);
    Header("Location: ../admin-page/product.php?delete_message=ok");
}

Header("Location: ../admin-page/product.php");
?>